package top.liuziqian.shop.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import top.liuziqian.common.core.domain.BaseEntity;
import top.liuziqian.common.xss.Xss;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 商品单位表 shop_goods_unit
 *
 * @author liujian
 */
@ApiModel(value = "GoodsUnit", description = "商品单位")
public class GoodsUnit extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** 单位ID */
    @ApiModelProperty("单位ID")
    private Long unitId;

    /** 单位名称 */
    @ApiModelProperty(value = "单位名称",required = false)
    private String unitName;

  

    /** 排序 */
    @ApiModelProperty("排序")
    private Integer orderNum;

    

    public Long getUnitId() {
        return unitId;
    }

    public void setUnitId(Long unitId) {
        this.unitId = unitId;
    }

    @Xss(message = "单位名称不能包含脚本字符")
    @NotBlank(message = "单位名称不能为空")
    @Size(min = 0, max = 50, message = "单位名称不能超过50个字符")
    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

 

    public Integer getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
    }



    @Override
    public String toString() {
        return "GoodsUnit{" +
                "unitId=" + unitId +
                ", unitName='" + unitName + '\'' +
                ", orderNum=" + orderNum +
                '}';
    }
}
